newlist=[]
def mysort(inlist):
    while len(inlist)>0:
        minidata =inlist[0]
        minidx=0
        indx=0
        for one in inlist:
            if minidata>one:
                minidata=one
                minidx=indx
            indx+=1
        inlist.pop(minidx)
        newlist.append(minidata)
    return newlist
print(mysort([9,7,6,5]))



alist=[8,3,0,5]
for  a in range(len(alist)-1):
    for b in range(len(alist)-a-1):
        if alist[b]>alist[b+1]:
            alist[b],alist[b+1]=alist[b+1],alist[b]
print(alist)




# aa=[5,3,4,1,7]
# del aa[0]
# print(aa)
#
# a1=[1,2,3,4]
# a1.remove(4)
# print(a1)
#
# a2=[4,6,7,3,2]
# a2.pop(0)
# print(a2)

# newlist=[]
# def mysort(inlist):
#     while len(inlist)>0:
#         minidata=inlist[0]
#         minidx=0
#         indx=0
#         for one in inlist:
#             if minidata>one:
#                 minidata = one
#                 minidx = indx
#             indx+=1
#         inlist.pop(minidx)
#         newlist.append(minidata)
#
#     return newlist
# print(mysort([9,7,8,4,6,5]))








# def paiLie():
#     relist = []
#     for i in range(4):
#         x = input("请输入数字:")
#         relist.append(x)
#     relist.sort()
#     print(relist)
# paiLie()





# def func1(a,b):
#     print(a+b)
# func1(1,3)
#
# def fun(a,b):
#     return (a+b)
# print(fun(1,2))
#
#
# def fun(a,b):
#     return (a+b)
# sum=fun(1,4)
# print(sum)